<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        html,body{
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: gray;
        }
        .box{
            position: relative;
            width: 300px;
            height: 500px;
            transform-origin: center;
            transform-style: preserve-3d;
            animation: Arotate 3s linear 0s infinite  ;
        }
        .content{
            transform-origin: center;
            transform-style: preserve-3d;
            transform: rotateY(60deg);
        }
        @keyframes Arotate {
            0%{
                transform: rotateX(0deg);
            } 
            100%{
                transform: rotateX(360deg);
            }            
        }
        .card{
            text-align: center;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            font-size: 100px;
            transform-origin: center;
            background-color: rgba(13, 0, 192, 0.363);
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.486) inset;
        }
        .card:nth-child(1){
            transform: rotateX(60deg);
        }
        .card:nth-child(2){
            transform: rotateX(120deg);
            
        }
        .card:nth-child(3){
            transform: rotateX(180deg);
        }
        .card:nth-child(4){
            transform: rotateX(240deg);
        }
        .card:nth-child(5){
            transform: rotateX(300deg);
        }
        .card:nth-child(6){
            transform: rotateX(360deg);
        }
    </style>
</head>
<body>
    <div class="content">
    <div class="box">
        <div class="card">6</div>
        <div class="card">5</div>
        <div class="card">4</div>
        <div class="card">3</div>
        <div class="card">2</div>
        <div class="card">1</div>
    </div>
</div>
</body>
</html>